#region Summary

// 
// Owner : JackieHan 
// 
// Solution : DailyCollection 
// 
// Project : Jackie.Utility.Notify
// 
// File : MessageInfo.cs
// 
// CopyRight : Copyright © 2010-2011 Skomart Corporation, All Rights Reserved 
// 
// Summary : 消息定义
// 
// History : 
//			2011-04-25 11:15:57	    Create 
// 

#endregion

#region Using

using System;
using System.Runtime.Serialization;
using System.Text;

#endregion

namespace Jackie.Utility.Notify.Domain
{
    /// <summary> 
    /// 消息定义
    /// </summary>
    [DataContract]
    public class MessageInfo
    {
        /// <summary>
        /// 消息的大标题
        /// </summary>
        [DataMember]
        public TitleInfo Title { get; set; }

        /// <summary>
        /// 消息代码
        /// </summary>
        [DataMember]
        public string Code { get; set; }

        /// <summary>
        /// 消息内容
        /// </summary>
        [DataMember]
        public string Message { get; set; }

        /// <summary>
        /// 扩展消息(可以存放扩展消息对象的序列化结果)
        /// </summary>
        [DataMember]
        public string ExtenderMessage { get; set; }

        public override string ToString()
        {
            var builder = new StringBuilder();
            builder.Append("MessageInfo:{");
            builder.AppendFormat("Title:{0},Code:{1},Message:{2},ExtenderMessage:{3}", Title, Code, Message,
                                 ExtenderMessage);
            builder.Append("}");
            return builder.ToString();
        }
    }
}